﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<t_205_verk_hopur_12.Models.ChannelFormViewModel>" %>

  <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
            
            <div class="editor-label">
                <label for="Channel_Name">Stöðvar nafn:</label>
                <%= Html.HiddenFor(model => model.Channel.ID) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Channel.Name)%>
                <%= Html.ValidationMessageFor(model => model.Channel.Name)%>
            </div>
            <div class="clear"></div>
            
            <div class="editor-label">
                <label for="Channel_Description">Lýsing á stöð</label>
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.Channel.Description)%>
                <%= Html.ValidationMessageFor(model => model.Channel.Description)%>
            </div>
            <div class="clear"></div>
            
            <div class="editor-label">
               Stjórnsýsla
            </div>
                <div class="editor-field">
                <%= Html.RadioButton("Autocracy", "true", Model.Channel.Autocracy, new Dictionary<string, object> { { "id", "AutoracyDemo" } })%>
                <label for="AutoracyDemo">Lýðræði</label>
                <%= Html.RadioButton("Autocracy", "false", !Model.Channel.Autocracy, new Dictionary<string, object> { { "id", "AutocracyDict" } })%>
                <label for="AutocracyDict">Einræði</label>
            </div>
            <div class="clear"></div>
            
            <div class="editor-label">
                <label for="Channel.CategoryID">Flokkur</label>
                <%= Html.DropDownList("Channel.CategoryID", (SelectList)ViewData["SelectList"], new Dictionary<string, object> { { "id", "Channel.CategoryID" } })%>
                <%= Html.ValidationMessageFor(model => model.Category) %>
            </div>
            <div class="clear"></div>
            
            <p>
                <input type="submit" value="Skrá" />
            </p>
    <% } %>